package com.zt.proxy.exception;


public class ServiceException extends RuntimeException {

        /**
         * 
         */
        private static final long serialVersionUID = 1L;
        
        /** 异常错误码 **/
        private String code;
    
        /** 异常描述 **/
        private String msg;
        
        /**
        *
        * @param code  错误码
        * @param msg 描述信息
        */
       public ServiceException(String code, String msg) {
           super(code+":"+msg);
           this.code = code;
           this.msg = msg;
       }
       
       /**
       *
       * @param code  错误码
       * @param msg 描述信息
       */
      public ServiceException(String msg) {
          super("9999:"+msg);
          this.code = "9999";
          this.msg = msg;
      }
    
       /**
       *
       *
       * 方法说明：异常错误码
       *
       * @return
       */
      public String getCode() {
          return code;
      }
    
      /**
       *
       *
       * 方法说明：异常描述信息
       *
       * @return
       */
      public String getMsg() {
          return msg;
      }

}
